class BootStrapForm(object):
    """
        定义的bootstrap基类方便别的类继承调用
    """
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        for name, filed in self.fields.items():  # 给每个文本框加个class和提示消息
            filed.widget.attrs['class'] = 'form-control'
            filed.widget.attrs['placeholder'] = '请输入%s' % (filed.label,)